package com.hao.hospital.util;

import java.io.BufferedReader;

import com.alibaba.fastjson.JSONObject;
import com.jfinal.core.Controller;

public class RequestGetData {
	public static JSONObject getRequestObject(Controller c) throws Exception {
		StringBuilder json = new StringBuilder();
		BufferedReader reader = c.getRequest().getReader();
		String line = null;
		while((line = reader.readLine()) != null){
			json.append(line);
		}
		reader.close();
		return JSONObject.parseObject(json.toString(), JSONObject.class);
	}
}
